hvm: x86 ioemu-dm does not need a memory-size parameter on the command line.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 4 Apr 2007 17:41:42 +0000 (18:41 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 4 Apr 2007 17:41:42 +0000 (18:41 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
tools/ioemu/target-i386-dm/exec-dm.c
tools/ioemu/xenstore.c
tools/python/xen/xend/image.py

index 225f8b6f3a991aa5a72c4ffda2494584551ec411..d992f987e158715af96010cd33579a89ad04f6b5 100644 (file)
@@ -431,14 +431,8 @@ static inline int paddr_is_ram(target_phys_addr_t addr)
 {
     /* Is this guest physical address RAM-backed? */
 #if defined(CONFIG_DM) && (defined(__i386__) || defined(__x86_64__))
-    if (ram_size <= HVM_BELOW_4G_RAM_END)
-        /* RAM is contiguous */
-        return (addr < ram_size);
-    else
-        /* There is RAM below and above the MMIO hole */
-        return ((addr < HVM_BELOW_4G_MMIO_START) ||
-                ((addr >= HVM_BELOW_4G_MMIO_START + HVM_BELOW_4G_MMIO_LENGTH)
-                 && (addr < ram_size + HVM_BELOW_4G_MMIO_LENGTH)));
+    return ((addr < HVM_BELOW_4G_MMIO_START) ||
+            (addr >= HVM_BELOW_4G_MMIO_START + HVM_BELOW_4G_MMIO_LENGTH));
 #else
     return (addr < ram_size);
 #endif
index 77819cea67247190ba3f2bfb74db4f6f2a70afad..e04a74236cf1ce75ce1d190d6bfd68d2b720af60 100644 (file)
@@ -272,7 +272,7 @@ void xenstore_process_logdirty_event(void)
 
         /* Double-check that the bitmaps are the size we expect */
         if (logdirty_bitmap_size != *(uint32_t *)seg) {
-            fprintf(logfile, "Log-dirty: got %lu, calc %lu\n", 
+            fprintf(logfile, "Log-dirty: got %u, calc %lu\n", 
                     *(uint32_t *)seg, logdirty_bitmap_size);
             return;
         }
@@ -304,7 +304,7 @@ void xenstore_process_logdirty_event(void)
         fprintf(logfile, "Log-dirty: bad next-active entry: %s\n", act);
         exit(1);
     }
-    logdirty_bitmap = seg + i * logdirty_bitmap_size;
+    logdirty_bitmap = (unsigned long *)(seg + i * logdirty_bitmap_size);
 
     /* Ack that we've switched */
     xs_write(xsh, XBT_NULL, active_path, act, len);
@@ -612,7 +612,7 @@ int xenstore_vm_write(int domid, char *key, char *value)
 
     path = xs_get_domain_path(xsh, domid);
     if (path == NULL) {
-       fprintf(logfile, "xs_get_domain_path(%d): error\n");
+       fprintf(logfile, "xs_get_domain_path: error\n");
        goto out;
     }
 
index 835a5d8060e380e13c15aa8f80bfa68ec6bb54b0..ecdea40074599c41c59d85923650c14f7f5f7f9b 100644 (file)
@@ -426,11 +426,14 @@ class HVMImageHandler(ImageHandler):
         # Execute device model.
         #todo: Error handling
         args = [self.device_model]
-        args = args + ([ "-d",  "%d" % self.vm.getDomid(),
-                  "-m", "%s" % (self.getRequiredInitialReservation() / 1024)])
+        args = args + ([ "-d",  "%d" % self.vm.getDomid() ])
+        if arch.type == "ia64":
+            args = args + ([ "-m", "%s" %
+                             (self.getRequiredInitialReservation() / 1024) ])
         args = args + self.dmargs
         if restore:
-            args = args + ([ "-loadvm", "/tmp/xen.qemu-dm.%d" % self.vm.getDomid() ])
+            args = args + ([ "-loadvm", "/tmp/xen.qemu-dm.%d" %
+                             self.vm.getDomid() ])
         env = dict(os.environ)
         if self.display:
             env['DISPLAY'] = self.display